package com.finalministry.server;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

import org.finalministry.database.dao.DaoFactory;

@Path("/territory")
public class ServiceTerritory extends IndexBase {

	@GET
   @Produces(MediaType.APPLICATION_JSON)
   public Response getAll() throws Exception {

      return Response.ok(DaoFactory.getInstance().getTerritoryDAO().getAll()).build();
	}
}